//import java.util.Scanner;

public class Calculator {
	private int operation, number1, number2;
	//Scanner myScan = new Scanner(System.in);
	/**
	 * @param args
	 */
		
	public void setOperation(int op)
	{
		operation = op;
	}
	
	public int getOperation()
	{
		return operation;
	}
	
	public void setNumber1(int n1)
	{
		number1 = n1;
	}
	
	public void setNumber2(int n2)
	{
		number2 = n2;
	}
	
	public int getNumber1()
	{
		return number1;
	}
	
	public int getNumber2()
	{
		return number2;
	}
	
	public void doOperation()
	{
		long result;
		int opr = getOperation();
		if (opr == 1)
			{
				result = addNumbers(number1, number2);
				printResults(result);
			}
		else if(opr ==2)
			{
				result = subtractNumbers(number1,number2);
				printResults(result);
			}
		else if(opr ==3)
		{
			result = multiplyNumbers(number1, number2);
			printResults(result);
		}
		else if(opr ==4)
		{
			float result1 = divideNumbers(number1, number2);
			printResults(result1);
		}
		else
		{
			System.out.println("Invalid operation entered");
		}
	}
	
	public void printResults(double result)
	{
		
		System.out.println (result);
		
	}
	
	public long addNumbers(int n1, int n2)
	{
		return (n1+n2);
	}
		
	public int subtractNumbers(int n1, int n2)
	{
		return (n1-n2);
	}
	
	public long multiplyNumbers(int n1, int n2)
	{
		return (n1*n2);
	}
	
	public float divideNumbers(int n1, int n2)
	{
		return (n1/n2);
	}
	

}
